import 'flutter_huawei_cloud_platform_interface.dart';
import 'src/obs_progress.dart';

class FlutterHuaweiCloud {
  Future<String?> getPlatformVersion() {
    return FlutterHuaweiCloudPlatform.instance.getPlatformVersion();
  }

  Future<void> initialize({
    required String accessKey,
    required String secretKey,
    required String region,
  }) {
    return FlutterHuaweiCloudPlatform.instance.initialize(
      accessKey: accessKey,
      secretKey: secretKey,
      region: region,
    );
  }

  Future<String?> uploadFile(
    String bucketName,
    String objectKey,
    String filePath,
  ) {
    return FlutterHuaweiCloudPlatform.instance.uploadFile(
      bucketName,
      objectKey,
      filePath,
    );
  }

  Future<Map<String, String>?> uploadMultipleFile(
    String bucketName,
    List<Map<String, String>> files,
  ) {
    return FlutterHuaweiCloudPlatform.instance.uploadMultipleFile(
      bucketName,
      files,
    );
  }

  Stream<OBSProgress> get onUploadProgress =>
      FlutterHuaweiCloudPlatform.instance.onUploadProgress;
}
